1. Field of the Invention
The present invention relates to a data receiving method and apparatus, and more specifically to a decoder which deals with a coded data stream in a regularly organized layered structure of user information including video, audio, data and so forth.
2. Description of the Related Art
It has been a common practice to use a start code as a signal for synchronization or for execution startup of a process. Successful detection of a start code in a data stream has long been a challenge. It is also important to deal successfully with a situation where a start code pattern is detected by error and, particularly, to maintain a decoding operation without interruption by an error detection. However, no effective and satisfactory research has been conducted in this field.
Japanese Unexamined Patent Publication No. 288129/1989 discloses a conventional system which tries to detect a start code of a fixed bit pattern within a maximum detection tolerable error of one-bit. The conventional art is designed to avoid an error-related suspension of decoding operations when a one-bit error pattern of a start code is detected.
FIG. 37 is a block diagram of a start code detector according to the conventional art. The start code detector comprises a bit pattern comparator 51 and a start code pattern generator 53. The bit pattern comparator 51 receives an incoming bit stream 50 and outputs a data effective signal 52. The start code pattern generator 53 issues a start code pattern 54.
The conventional start code detector of FIG. 37 tries to detect a start code successfully by using an error detection evading method with an error detection tolerable capacity of one bit in the following manner. The bit pattern comparator 51 constantly watches incoming bits on an incoming bit stream 50 to detect a start code. FIG. 38 shows a list of five-bit patterns including a start code “11010”, for example, to be detected and its one-bit error patterns within the detection tolerable maximum capacity of one bit error. These one-bit error patterns differ from the start code pattern by one bit in different bit positions of the five-bit pattern.
The start code pattern generator 53 presents all the patterns in FIG. 38, for example, to the bit pattern comparator 51 for comparison. When a bit pattern on incoming data stream 50 is recognized as one of the patterns in FIG. 38, the bit pattern comparator 52 issues the data effective signal 52 for an effective period of the corresponding data.
Thus, the error detection evading method implemented in the conventional start code detector works with the detection tolerable capacity of one bit error. The conventional start code detector can perform a successful detection of a start code if the start code is erroneous by no more than one bit. In other words, an incoming bit pattern is examined not only with a correct start code pattern but with all of its one-bit error patterns in order to successfully detect a start code with a maximum of a one-bit error in its bit pattern.
The error detection may lead to a suspension of an operation. In this respect, the conventional start code detector is effective to evade error detection in a bit stream. However, the conventional start code detector is effective only under the specific condition that a single type of start code of fixed-bit length is used in the data stream. The conventional method of evading error detection can deal only with a single type of start code provided in a bit stream. Consequently, the conventional start code decoder cannot effectively deal with a data stream with two or more types of start codes which are to be detected or identified.
For example, a start code is defined as a specific coded word and used as a start delimiter of a layer as well as a starter of data in a coded data stream organized based on a digital video compression method which is prescribed in ISO/IEC 11172-2 (MPEG-1 video). This type of coded data stream contains two or more types of 32-bit start codes, each of which consists of a start code prefix followed by a start code value. The start code prefix is a string of unique twenty four bits which indicates a start code. The start code value is a string of eight bits which identifies the type of start code.
A start code in this type of coded data stream is detected or identified by recognizing the type of start code by the eight-bit start code value after detecting the unique twenty-four-bit start code prefix. The conventional detection error evading method with a detection tolerable capacity of one-bit error may be used to detect the unique start code prefix. However, the conventional method is of no use for the detection of a start code value which can be a plurality of values, some of which differ from one another by one bit. Application of the conventional method to a start code detection with this coded data stream may cause serious decoding damage in a decoder.
In the view of the foregoing problems, it is an object of the present invention to provide a decoder for decoding data in a coded data stream which can minimize video data damage by error detection of a start code or specific code word.
It is another object of the present invention to provide a decoder which tries to maintain an operation when detecting a start code or specific code word with minor or bit error by using the most similar replacement to the detected code of others.
It is a further object of the present invention to provide a decoder which can mask an error by limiting the area and period of error masking on the display when a detected error start code cannot be replaced.
It is a further object of the present invention to provide a data receiving apparatus which can minimize damage to video data by error detection.
It is a further object of the present invention to realize a data receiving method for minimizing error detection which can be implemented in a decoder for decoding data in a data stream or in a data receiving apparatus.